//
//  FeedOrderList.swift
//
//  Created by aowang on 2018/5/31
//  Copyright (c) . All rights reserved.
//

import Foundation
import ObjectMapper

public final class ZyaFeedOrderList: Mappable {

  // MARK: Declaration for string constants to be used to decode and also serialize.
  private struct SerializationKeys {
    static let sOrderformNo = "s_orderform_no"
    static let saleId = "sale_id"
    static let idKey = "id_key"
    static let sAmountT = "s_amount_t"
    static let auditMark = "audit_mark"
    static let xgAuditMark = "xg_audit_mark"
    static let sState = "s_state"
    static let sCkgz = "s_ckgz"
    static let sOperationNm = "s_operation_nm"
    static let sOrderformDate = "s_orderform_date"
    static let sAuditMark = "s_audit_mark"
    static let sNo = "s_no"
    static let sDate = "s_date"
    static let sClientAddress = "s_client_address"
    static let sRemark = "s_remark"
    static let tjYjrq = "tj_yjrq"
    static let sPayMoney = "s_pay_money"
    static let zPayStatus = "z_pay_status"
    static let sPayState = "s_pay_state"
    static let advanceBs = "advance_bs"
    static let kfId = "kf_id"

    
  }

  // MARK: Properties
  public var sOrderformNo: String?
  public var saleId: String?
  public var idKey: String?
  public var sAmountT: Int?
  public var auditMark: String?
  public var xgAuditMark: String?
  public var sState: String?
  public var sCkgz: String?
  public var sOperationNm: String?
  public var sOrderformDate: String?
  public var sAuditMark: String?
    public var sNo: String?
    public var sClientAddress: String?
    public var sRemark: String?
    public var tjYjrq: String?
    public var sDate:String?
    public var sPayMoney: Double?
    public var zPayStatus: String?
    public var sPayState: String?
    public var advanceBs: String?
    public var kfId: String?

    
    
  // MARK: ObjectMapper Initializers
  /// Map a JSON object to this class using ObjectMapper.
  ///
  /// - parameter map: A mapping from ObjectMapper.
  public required init?(map: Map){

  }

  /// Map a JSON object to this class using ObjectMapper.
  ///
  /// - parameter map: A mapping from ObjectMapper.
  public func mapping(map: Map) {
    sOrderformNo <- map[SerializationKeys.sOrderformNo]
    saleId <- map[SerializationKeys.saleId]
    sPayMoney <- map[SerializationKeys.sPayMoney]
    idKey <- (map[SerializationKeys.idKey],StringTransform())
    advanceBs <- (map[SerializationKeys.advanceBs],StringTransform())
    kfId <- (map[SerializationKeys.kfId],StringTransform())

    
    sAmountT <- map[SerializationKeys.sAmountT]
    auditMark <- map[SerializationKeys.auditMark]
    xgAuditMark <- map[SerializationKeys.xgAuditMark]
    sState <- map[SerializationKeys.sState]
    sCkgz <- map[SerializationKeys.sCkgz]
    sOperationNm <- map[SerializationKeys.sOperationNm]
    sOrderformDate <- map[SerializationKeys.sOrderformDate]
    sAuditMark <- map[SerializationKeys.sAuditMark]
    sNo <- map[SerializationKeys.sNo]
    sDate <- map[SerializationKeys.sDate]
    sClientAddress <- map[SerializationKeys.sClientAddress]
    sRemark <- map[SerializationKeys.sRemark]
    tjYjrq <- map[SerializationKeys.tjYjrq]
    zPayStatus <- (map[SerializationKeys.zPayStatus],StringTransform())
    sPayState <- (map[SerializationKeys.sPayState],StringTransform())
  }

  /// Generates description of the object in the form of a NSDictionary.
  ///
  /// - returns: A Key value pair containing all valid values in the object.
  public func dictionaryRepresentation() -> [String: Any] {
    var dictionary: [String: Any] = [:]
    if let value = sOrderformNo { dictionary[SerializationKeys.sOrderformNo] = value }
    if let value = saleId { dictionary[SerializationKeys.saleId] = value }
    if let value = idKey { dictionary[SerializationKeys.idKey] = value }
    if let value = sAmountT { dictionary[SerializationKeys.sAmountT] = value }
    if let value = auditMark { dictionary[SerializationKeys.auditMark] = value }
    if let value = xgAuditMark { dictionary[SerializationKeys.xgAuditMark] = value }
    if let value = sState { dictionary[SerializationKeys.sState] = value }
    if let value = sCkgz { dictionary[SerializationKeys.sCkgz] = value }
    if let value = sOperationNm { dictionary[SerializationKeys.sOperationNm] = value }
    if let value = sOrderformDate { dictionary[SerializationKeys.sOrderformDate] = value }
    if let value = sAuditMark { dictionary[SerializationKeys.sAuditMark] = value }
    if let value = sNo { dictionary[SerializationKeys.sNo] = value }
    if let value = advanceBs { dictionary[SerializationKeys.advanceBs] = value }
    if let value = kfId { dictionary[SerializationKeys.kfId] = value }
    if let value = sRemark { dictionary[SerializationKeys.sRemark] = value }
    if let value = tjYjrq { dictionary[SerializationKeys.tjYjrq] = value }
    if let value = sClientAddress { dictionary[SerializationKeys.sClientAddress] = value }

    
    
    
    return dictionary
  }

}
